package cn.bdqn.controller.sys;

import cn.bdqn.service.sys.SysStudentService;
import cn.bdqn.utils.MyLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @ProjectName: ycbdqn
 * @Package: cn.bdqn.controller.sys
 * @Author: huat
 * @Date: 2020/3/11 17:42
 * @Version: 1.0
 */
@Controller
@RequestMapping("/sys/student")
public class StudentController {
    @Autowired
    SysStudentService sysStudentService;
    /**
     * 进入学生信息界面
     */
    @RequestMapping("intoStudent")
    public String intoStudent(){
        return "student/student";
    }

    /**
     * 分页查询学生
     * @param page 起始页
     * @param limit 页面大小
     * @param username  学生姓名
     * @param realName 学生真实姓名
     * @return
     */
    @RequestMapping("getStudent")
    @ResponseBody
    @MyLog("查看学生信息")
    public Map<String,Object> getStudent(int page,int limit,String username,String realName){
        return sysStudentService.getStudent(page, limit, username, realName);
    }
}
